<!--{*
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
*}-->
<script type="text/javascript">
function doPreview(){
	document.form_edit.mode.value="preview"
	document.form_edit.target = "_blank";
	document.form_edit.submit();
}

function fnTargetSelf(){
	document.form_edit.target = "_self";
}

</script>

<SCRIPT language="JavaScript">
<!--
browser_type = 0;
if(navigator.userAgent.indexOf("MSIE") >= 0){
    browser_type = 1;
}
else if(navigator.userAgent.indexOf("Mozilla") >= 0){
    browser_type = 2;
}
//-->
</SCRIPT>

<div id="alpha">
<div id="alpha-inner">
<!--▼SUB NAVI-->
<!--{include file=$tpl_subnavi}-->
<!--▲SUB NAVI-->
</div>
</div>



<div id="beta">
<div id="beta-inner">
<form name="form_edit" id="form_edit" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->" >
<input type="hidden" name="mode" value="">
<input type="hidden" name="page_id" value="<!--{$page_id}-->">
<div class="title_page">
<h2><!--{$tpl_subtitle}--></h2>
</div>



<!--▼編集画面　ここから-->
<!--{if $arrErr.page_id_err != ""}-->
<div class="nodata">
<p><!--{$arrErr.page_id_err}--></p>
</div>
<!--{/if}-->
						

<div class="menuclass">
<dl>
<dt>名称</dt>
<dd>
	<!--{ if $arrErr.page_name != "" }--><span class="red12"><!--{$arrErr.page_name}--></span><!--{/if}-->
	<!--{if $arrPageData.edit_flg == 2}-->
	<!--{$arrPageData.page_name|escape}--><input type="hidden" name="page_name" value="<!--{$arrPageData.page_name|escape}-->" />
	<!--{else}-->
	<input type="text" name="page_name" value="<!--{$arrPageData.page_name|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" style="<!--{if $arrErr.page_name != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->" size="60" class="box60" /><span class="red"> （上限<!--{$smarty.const.STEXT_LEN}-->文字）</span>
	<!--{/if}-->
</dd>

<dt>URL</dt>
<dd>
	<!--{ if $arrErr.url != "" }--><span class="red12"><!--{$arrErr.url}--></span><!--{/if}-->
	<!--{if $arrPageData.edit_flg == 2}-->
	<!--{$smarty.const.SITE_URL}--><!--{$arrPageData.url|escape}-->
	<input type="hidden" name="url" value="<!--{$arrPageData.filename|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" />
	<!--{else}-->
	<!--{$user_URL}--><input type="text" name="url" value="<!--{$arrPageData.directory|escape}--><!--{$arrPageData.filename|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" style="<!--{if $arrErr.url != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}--> ime-mode: disabled;" size="40" class="box40" />.php<span class="red"> （上限<!--{$smarty.const.STEXT_LEN}-->文字）</span>
	<!--{/if}-->
</dd>

<dt>テンプレート設定</dt>
<dd>
	<label for="header"><input type="checkbox" name="header_chk" id="header" <!--{$arrPageData.header_chk}-->>共通のヘッダーを使用する</label>
	<label for="footer"><input type="checkbox" name="footer_chk" id="footer" <!--{$arrPageData.footer_chk}-->>共通のフッターを使用する</label>
</dd>

<dt>編集領域</dt>
<dd>
	<textarea name="tpl_data" cols=90 rows=<!--{$text_row}--> align="left" wrap=off style="width: 650px; "><!--{$arrPageData.tpl_data|escape|smarty:nodefaults}--></textarea>
	<input type="hidden" name="html_area_row" value="<!--{$text_row}-->">
	<p><input type="button" value="大きくする" onClick="ChangeSize(this, tpl_data, 50, 13, html_area_row)"></p>
</dd>
</dl>
</div>



<div class="btn_box">
<input type='button' value='登録' name='subm' onclick="fnTargetSelf(); fnFormModeSubmit('form_edit','confirm','','');"  />
<input type='button' value='プレビュー' name='preview' onclick="doPreview(); "  />
</div>
<!--▲編集画面　ここまで-->


						
<!--▼一覧　ここから-->
<h3>編集可能画面一覧</h3>

<div class="menuclass">
<table summary="編集可能画面一覧">
<!--{foreach key=key item=item from=$arrPageList}-->
<tr>
	<td align="center" bgcolor="<!--{if $item.page_id == $page_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->">
	<a href="<!--{$smarty.server.PHP_SELF|escape}-->?page_id=<!--{$item.page_id}-->" ><!--{$item.page_name}--></a>
	</td>
	<td align="center" bgcolor="<!--{if $item.page_id == $page_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->">
	<input type="button" value="レイアウト" name="layout<!--{$item.page_id}-->" onclick="location.href='./index.php?page_id=<!--{$item.page_id}-->';"  />
	<input type="hidden" value="<!--{$item.page_id}-->" name="del_id<!--{$item.page_id}-->">
	</td>
	<td align="center" bgcolor="<!--{if $item.page_id == $page_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->">
	<!--{if $item.edit_flg == 1}-->
	<input type="button" value="削除" name="del<!--{$item.page_id}-->" onclick="fnTargetSelf(); fnFormModeSubmit('form_edit','delete','page_id',this.name.substr(3));"  />
	<input type="hidden" value="<!--{$item.page_id}-->" name="del_id<!--{$item.page_id}-->">
	<!--{/if}-->
	</td>
</tr>
<!--{/foreach}-->
</table>


<div class="btn_box">
<input type='button' value='新規ページ作成' name='subm' onclick="location.href='http://<!--{$smarty.server.HTTP_HOST}--><!--{$smarty.server.PHP_SELF|escape}-->'">
</div>
</div>

</form>
</div>
</div>
